package com.xinzhidi.common.utils;

import org.springframework.stereotype.Component;

import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.URL;

public class UrlUtil {

    public static HttpURLConnection getConn(URL url){
        try {
            // 访问url
            return  (HttpURLConnection)url.openConnection();
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}
